Skip to content

Conversation

@fellyph
Copy link
Collaborator

@fellyph fellyph commented Nov 3, 2025

This pull request introduces the Kapa AI integration into the Docusaurus documentation site. The main changes include adding a Kapa AI button to the navbar by swizzling the Search component and registering a new plugin for Kapa AI. Additionally, there are minor improvements to comments for clarity and consistency.

Kapa AI Integration:

  • Added a Kapa AI button to the right of the Search bar in the navbar by customizing (swizzling) the Search component in Navbar/Search/index.js. The button triggers the Kapa AI widget when clicked.
  • Registered the Kapa AI plugin by adding './plugins/kapa-ai-plugin.js' to the plugins array in docusaurus.config.js.
  • Improved comments for clarity and corrected capitalization in docusaurus.config.js.

- Introduced a new alias for `@docusaurus/ComponentCreator` in the Docusaurus configuration, pointing to a custom implementation in `src/patches/ComponentCreator.js`.
- Implemented a dynamic loading mechanism for components using `react-loadable`, enhancing the routing and loading experience in the documentation site.
- Added error handling for module exports to ensure robust loading of components.
@fellyph fellyph requested a review from a team as a code owner November 3, 2025 17:44
@brandonpayton
Copy link
Member

brandonpayton commented Nov 5, 2025

The most significant changes are the addition of a custom ComponentCreator patch for Docusaurus,

@fellyph, what problem is this solving? Maintaining a patched version of a Docusaurus implementation detail seems like it would make our dependency on Docusaurus more fragile. It would be good to have more context around why this is needed.

@fellyph
Copy link
Collaborator Author

fellyph commented Nov 5, 2025

@brandonpayton, the changes were made to fix the issue with the pages that were crashing https://wordpress.github.io/wordpress-playground/api/blueprints/interface/EnableMultisiteStep/#Index

And add back the Ask AI button, that was removed previously

@brandonpayton
Copy link
Member

@brandonpayton, the changes were made to fix the issue with the pages that were crashing https://wordpress.github.io/wordpress-playground/api/blueprints/interface/EnableMultisiteStep/#Index

@fellyph ah, when I read

This PR also fixes the issue with the URL: https://wordpress.github.io/wordpress-playground/api/blueprints/interface/EnableMultisiteStep/#Index

I thought that fixing the crash was a bonus on top of the other changes in this PR.

I was about to ask more about patching the ComponentCreator, but it looks like that has been removed now.

Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes were made to fix the issue with the pages that were crashing https://wordpress.github.io/wordpress-playground/api/blueprints/interface/EnableMultisiteStep/#Index

Besides the build plugin that references ComponentCreator, I'm not sure what changes remain that should fix the enable-multi-site step. It looks like maybe just adding the Kapa AI button remains. Am I missing something?

Updated comments for clarity and corrected casing in metadata description.
@fellyph fellyph changed the title [Docs] Adding ask ai button and fixing page issue [Docs] Adding ask AI Button Nov 5, 2025
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested, but this looks good to me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants